package com.fzdy.dataplatform.core.controller;


import com.fzdy.dataplatform.core.exception.CheckException;
import com.fzdy.dataplatform.service.SyslogService;
import com.fzdy.dataplatform.webutil.WebUtilify;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by Administrator on 2017/3/28 0028.
 */
public class BaseController {
    @Autowired
    protected WebUtilify webUtilify;
    @Autowired
    protected SyslogService syslogService;

    public BaseController() {
    }

    protected void errorMsg(String msg) {
        throw new CheckException(msg);
    }

    protected void checkNull(Object obj, String msg) {
        if(obj == null) {
            this.errorMsg(msg);
        }

    }
}
